﻿<%@ Page Title="Register" Language="VB" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Register.aspx.vb" Inherits="WSAD_Assignment.Register" %>

<asp:Content runat="server" ID="BodyContent" ContentPlaceHolderID="MainContent">
    <h3 class="form-signup-heading">Register</h3>

    <hgroup class="title">
        <%--<h1><%: Title %>.</h1>
        <h2>Use the form below to create a new account.</h2>--%>
    </hgroup>

    <asp:CreateUserWizard runat="server" ID="RegisterUser" ViewStateMode="Disabled" OnCreatedUser="RegisterUser_CreatedUser">
        <LayoutTemplate>
            <asp:PlaceHolder runat="server" ID="wizardStepPlaceholder" />
            <asp:PlaceHolder runat="server" ID="navigationPlaceholder" />
        </LayoutTemplate>
        <WizardSteps>
            <asp:CreateUserWizardStep runat="server" ID="RegisterUserWizardStep">
                <ContentTemplate>
                    <%--<p class="message-info">
                        Passwords are required to be a minimum of <%: Membership.MinRequiredPasswordLength %> characters in length.
                    </p>--%>

                    <p class="validation-summary-errors">
                        <asp:Literal runat="server" ID="ErrorMessage" />
                    </p>

                    <fieldset>
                        <legend>Registration Form</legend>
                        <ol>
                            <li>
                                <div class="form-group">
                                    <asp:Label ID="lblUserName" AssociatedControlID="UserName" runat="server" CssClass="col-sm-2 control-label" Text="Username"></asp:Label>

   		                            <div class="col-sm-4">
                                        <asp:TextBox ID="UserName" name="UserName" runat="server" CssClass="form-control" placeholder="Username"></asp:TextBox>
                                        <asp:RequiredFieldValidator runat="server" ControlToValidate="UserName"
                                                            CssClass="field-validation-error" ErrorMessage="This field is required!" />
                                    </div>
                                </div>  
                            </li>

                            <li>
                                <div class="form-group">
                                    <asp:Label ID="lblEmailAddress" AssociatedControlID="Email" runat="server" CssClass="col-sm-2 control-label" Text="Email Address"></asp:Label>

   		                            <div class="col-sm-4">
                                        <asp:TextBox ID="Email" name="Email" runat="server" CssClass="form-control" placeholder="Email Address"></asp:TextBox>
                                        <asp:RequiredFieldValidator runat="server" ControlToValidate="Email"
                                                        CssClass="field-validation-error" Display="Dynamic" ErrorMessage="This field is required!" />
                                        <asp:RegularExpressionValidator runat="server" ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" 
                                                        CssClass="field-validation-error" ControlToValidate="Email" Display="Dynamic" ErrorMessage="Please enter a valid email address!"></asp:RegularExpressionValidator>
                                    </div>
                            </li>

                            <li>
                                <div class="form-group">
                                    <asp:Label ID="lblPassword" AssociatedControlID="Password" runat="server" CssClass="col-sm-2 control-label" Text="Password"></asp:Label>

   		                            <div class="col-sm-4">
                                        <asp:TextBox ID="Password" name="Password" runat="server" TextMode="Password" CssClass="form-control" placeholder="Password"></asp:TextBox>
                                        <asp:RequiredFieldValidator runat="server" ControlToValidate="Password"
                                                    CssClass="field-validation-error" ErrorMessage="This field is required!" />
                                    </div>
                                </div>
                            </li>

                            <li>
                                <div class="form-group">
                                    <asp:Label ID="lblConfirmPassword" AssociatedControlID="ConfirmPassword" runat="server" CssClass="col-sm-2 control-label" Text="Confirm Password"></asp:Label>

   		                            <div class="col-sm-4">
                                        <asp:TextBox ID="ConfirmPassword" name="ConfirmPassword" runat="server" TextMode="Password" CssClass="form-control" placeholder="Confirm Password"></asp:TextBox>
                                        <asp:RequiredFieldValidator runat="server" ControlToValidate="ConfirmPassword" 
                                                CssClass="field-validation-error" Display="Dynamic" ErrorMessage="This field is required!" />
                                        <asp:CompareValidator runat="server" ControlToCompare="Password" ControlToValidate="ConfirmPassword"
                                                CssClass="field-validation-error" Display="Dynamic" ErrorMessage="The password and confirmation password do not match!" />
                                    </div>
                                </div>
                            </li>
                        </ol>
                        <div class="form-group">
                            <asp:LinkButton ID="btnRegister" 
                                runat="server"
                                CommandName="MoveNext"
                                CssClass="btn btn-success"  
                                CausesValidation="true">
                                <i aria-hidden="true" class="glyphicon glyphicon-flash"></i> Register
                            </asp:LinkButton>
                        </div>
                    </fieldset>
                </ContentTemplate>
                <CustomNavigationTemplate />
            </asp:CreateUserWizardStep>
        </WizardSteps>
    </asp:CreateUserWizard>
</asp:Content>